<?xml version="1.0"?>
<!DOCTYPE html PUBLIC
    "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
    "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<?xml-stylesheet type="text/xsl" href="http://www.w3.org/Math/XSL/pmathml.xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<title>test</title>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=utf-8"/>
	<meta http-equiv="Content-Script-Type" content="text/javascript"/>
</head>
<body>

<div id="cont">
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mi>&#x2202;</mi>
	<mrow>
		<mi>x</mi>
		<mo>=</mo>
		<mfrac>
			<mrow>
				<mrow>
					<mo>-</mo>
					<mi>b</mi>
				</mrow>
				<mo id="curs">&VerticalLine;</mo>
				<msqrt>
					<mrow>
						<msup>
							<mi>b</mi>
							<mn>2</mn>
						</msup>
						<mo>-</mo>
						<mrow>
							<mn>4</mn>
							<mo>*</mo>
							<mi>a</mi>
							<mo>*</mo>
							<mi>c</mi>
						</mrow>
					</mrow>
				</msqrt>
			</mrow>
			<mrow>
				<mn>2</mn>
				<mo>*</mo>
				<mi>a</mi>
			</mrow>
		</mfrac>
	</mrow>
</math>
</div>
<script type="text/javascript"><![CDATA[
var a = '<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mo id="curs">&VerticalLine;<'+'/mo><mi style="color:green;">&#x2202;<'+'/mi><'+'/math>';

var b = '<math><mrow><mi>&#x2202<'+'/mi><mi>&#x2202;<'+'/mi><'+'/mrow><'+'/math>';


window.onkeypress = myonkeypress;
var curs = document.getElementById('curs');
var cont = document.getElementById('cont');
var i = 1;
function myonkeypress(e) {
	if (e.which != 32) return;
	alert(b);
	cont.innerHTML = b;
	i = 1 - i;
	alert(cont.innerHTML);
}
]]>
</script>
</body>
</html>
